<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

/**
 * 
 *
 * @property int $id
 * @property string $account 微信账号
 * @property int $status 状态 1正常 0禁用
 * @property int $send_limit 状态 1正常 2限制
 * @property string|null $remark 备注
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount query()
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereAccount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereSendLimit($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WeChatAccount whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class WeChatAccount extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'we_chat_account';

    public static function getAccounts($status = 1){

        return self::where('status',$status)->pluck('account','id');
    }


}
